<template>
    <BaseInsideDrawer :modal="false" v-model="isShow" width="100%">
        <div class="w-full h-full bg-white ">
            <BaseCode ref="baseCodeRef"></BaseCode>
        </div>
    </BaseInsideDrawer>
</template>

<script setup lang="ts">
import {nextTick, ref} from "vue";

const isShow = ref(false)
const baseCodeRef = ref()
const init = (str: string) => {
    isShow.value = !isShow.value
    nextTick(() => {
        if (isShow.value) {
            baseCodeRef.value.init(str, 'json')
        }
    })

}
defineExpose({init})
</script>

<style scoped>

</style>